<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
$setting=$this->plugin_setting('setting');
$return['setting']=$setting;
if($_RQ['op']=='get'){
	$id=intval($_RQ['id']);
	if(!$id){
		exi('没有找到该活动，请重新选择！','error','jy_ewm/index/');
	}
	pdo_update('jy_ewm_list',array('num +='=>1),array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	$item=pdo_get('jy_ewm_list',array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	$item['images']=json_decode($item['images'],true);
	$return['item']=$item;
	$return['sharedata']=array(
		'title'=>$item['title'],
		'desc'=>$item['desc'],
		'link'=>custom_url('jy_ewm/item//id='.$item['id'],true),
		'imgUrl'=>ATTACHMENT_URL.$item['image'],
	);
	set_html('title',$item['title']);
	exi($return);
}
